from django.http import HttpResponse
from django.template import Context, Template, loader
from django.shortcuts import get_object_or_404
from zedresearch.press.models import PressRelease

#def press(request):
#  c = Context({'fav_color':['blue','green']})
#  t = loader.get_template('press/demo.html')
#  rendered_template = t.render(c)
 # return HttpResponse(rendered_template)

def press(request,pid):
 # (p = get_object_or_404(PressRelease, id=1)
 # return HttpResponse(p.title)
   p = PressRelease.object.get(id=pid)
 # c = Context({'press':p})
 # t = loader.get_template('press/demo.html')
 # return HttpResponse(t.render(c))